Skip to content

Conversation

@ismail2009
Copy link
Collaborator

…lic in webpack-config

#6

import { render } from 'react-dom';
import App from './components/App';

render(<App />, document.getElementById('container'));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this won't work, you need to import react-dom and call render from it like this:

import ReactDOM from 'react-dom';
ReactDOM.render(
 <App />,
  document.getElementById('container')
);

and if you are going to use redux you will need to import react-redux here and provide the store like this:

import { Provider } from 'react-redux';
import store from './store';
ReactDOM.render(
  <Provider store={store}>
    <App />
  </Provider>,
  document.getElementById('container')
);

"clean": "rimraf build",
"prod:build": "clean && webpack -p"
"clean": "rimraf public/bundle.js",
"prod:build": "npm run clean && webpack -p"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add start and build scripts

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants